<template>
  <div class="zmDialog">
    <el-dialog
      title="农业用水知识提示"
      :center="dialogTitleAlign"
      :visible.sync="visible"
      :close-on-click-modal="closeOnClickModal"
      :close-on-press-escape="closeOnPressEscape"
      :show-close="showClose"
    >
      <div class="dialogClose" @click="dialogCloseClick"></div>
      <div>
        <div class="module_table">
          <j-form-container>
            <div v-if="model == null">暂无推送</div>
            <a-form-model ref="form" :model="model" v-if="model != null" slot="detail">
              <a-row>
                <a-col :span="24">
                  <!-- <a-form-model-item label="当前时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="variety">
            <a-input v-model="model.variety" placeholder="请输入品种"></a-input>
          </a-form-model-item> -->
                </a-col>
                <a-col :span="24">
                  <a-form-model-item
                    label="所处生育期"
                    :labelCol="labelCol"
                    :wrapperCol="wrapperCol"
                    prop="periodDuration"
                  >
                    <j-dict-select-tag
                      type="list"
                      v-model="model.periodDuration"
                      dictCode="period_duration"
                      placeholder="暂无"
                      disabled
                    />
                  </a-form-model-item>
                </a-col>
                <a-col :span="24">
                  <a-form-model-item label="阶段名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phaseName">
                    <a-input v-model="model.phaseName" placeholder="暂无" disabled></a-input>
                  </a-form-model-item>
                </a-col>
                <a-col :span="24">
                  <a-form-model-item label="当前时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime">
                    <a-date-picker placeholder="暂无" v-model="model.time" style="width: 100%" disabled />
                  </a-form-model-item>
                </a-col>
                <!-- <a-col :span="24">
          <a-form-model-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime">
            <a-date-picker placeholder="请选择结束时间" v-model="model.endTime" format="MM-DD" style="width: 100%" />
          </a-form-model-item>
        </a-col> -->
                <!-- <a-col :span="24">
          <a-form-model-item label="龄期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="age">
            <j-dict-select-tag type="list" v-model="model.age" dictCode="age" placeholder="请选择龄期" />
          </a-form-model-item>
        </a-col> -->
                <a-col :span="24">
                  <a-form-model-item
                    label="灌溉措施"
                    :labelCol="labelCol"
                    :wrapperCol="wrapperCol"
                    prop="irrigationMeasures"
                  >
                    <a-textarea v-model="model.irrigationMeasures" rows="4" placeholder="暂无 " disabled />
                  </a-form-model-item>
                </a-col>
                <a-col :span="24">
                  <a-form-model-item
                    label="施肥措施"
                    :labelCol="labelCol"
                    :wrapperCol="wrapperCol"
                    prop="fertilizationPractice"
                  >
                    <a-textarea v-model="model.fertilizationPractice" rows="4" placeholder="暂无" disabled />
                  </a-form-model-item>
                </a-col>
                <a-col :span="24">
                  <a-form-model-item
                    label="植保措施"
                    :labelCol="labelCol"
                    :wrapperCol="wrapperCol"
                    prop="plantProtectionMeasures"
                  >
                    <a-textarea v-model="model.plantProtectionMeasures" rows="4" placeholder="暂无" disabled />
                  </a-form-model-item>
                </a-col>
                <!-- <a-col :span="24">
          <a-form-model-item label="积温带" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jiwendai">
            <j-dict-select-tag type="list" v-model="model.jiwendai" dictCode="JiWenDai" placeholder="请选择积温带" />
          </a-form-model-item>
        </a-col> -->
              </a-row>
            </a-form-model>
          </j-form-container>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { postAction, getAction } from '@/api/manage'
export default {
  components: {},
  props: ['visible', 'tsId'],
  created() {},
  watch: {
    tsId(newVal, oldVal) {
      if (newVal) {
        getAction('/youyi/paddyMeasureManage/queryById', { id: newVal }).then((res) => {
          this.model = res.result
        })
      }
    },
  },
  data() {
    return {
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      // 弹窗配置
      closeOnClickModal: false,
      closeOnPressEscape: false,
      showClose: false,
      dialogTitleAlign: true,
    }
  },
  methods: {
    dialogCloseClick() {
      this.$emit('close')
    },
  },
}
</script>
  <style lang="less" scoped>
label {
  color: #fff !important;
  font-size: 20px !important;
}
.zmDialog {
  position: relative;
  .dialogClose {
    width: 29px;
    height: 29px;
    background: url('../../../assets/images/intelligentIrrigation/dialogClose.png');
    background-size: 100% 100%;
    position: absolute;
    right: 27px;
    top: 30px;
    cursor: pointer;
  }
  .module_search {
    position: absolute;
    top: 111px;
    left: 25px;
    display: flex;
    .module_search_word {
      font-size: 18px;
      font-family: FZLanTingHei-DB-GBK, FZLanTingHei-DB-GBK-Regular;
      font-weight: 400;
      color: #ffffff;
      line-height: 35px;
    }
  }
  .module_table {
    position: absolute;
    top: 165px;
    left: 23px;
    width: 1142px;
    .pagination_total {
      position: absolute;
      bottom: 9px;
      left: 630px;
      font-size: 18px;
      font-family: FZLanTingHei-DB-GBK, FZLanTingHei-DB-GBK-Regular;
      font-weight: 400;
      text-align: left;
      color: #ffffff;
      line-height: 14px;
      .pagination_total_num {
        font-size: 18px;
        font-family: FZLanTingHei-DB-GBK, FZLanTingHei-DB-GBK-Regular;
        font-weight: 400;
        text-align: left;
        color: #00fbff;
        line-height: 14px;
      }
    }
  }
}
</style>
  <style lang="less">
label {
  color: #fff !important;
  font-size: 20px !important;
}

.zmDialog .el-dialog {
  width: 1192px;
  height: 1000px;
  background: rgba(1, 31, 86, 0.92);
  border: 1px solid #00fbff;
}
.zmDialog .el-dialog__header {
  background: transparent;
  border-bottom: 1px solid #00395f;
  height: 80px;
  .el-dialog__title {
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(0deg, #1765ff 0%, #4a87ff 0%, #49d9fe 55%, #8fefff 80%);
    font-size: 30px;
    font-family: Microsoft YaHei, Microsoft YaHei-Bold;
    font-weight: 700;
    text-align: center;
    line-height: 45px;
  }
  .el-dialog__headerbtn {
    display: none;
  }
}
.module_search .el-input--medium .el-input__inner {
  height: 35px !important;
  line-height: 35px !important;
  border: 1px solid #00fbff !important;
}
.module_search .el-input__prefix {
  color: #00fbff;
}
.module_table .el-table th.el-table__cell.is-leaf,
.el-table--enable-row-transition .el-table__body td.el-table__cell {
  background: #001f4f;
  font-size: 16px;
  font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  font-weight: bold;
  text-align: center;
  color: #eef8ff;
  line-height: 48px;
  border-right: none;
  border-bottom-color: #5176a0;
}
.module_table .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background: #07376a;
  font-size: 16px;
  font-family: Microsoft YaHei, Microsoft YaHei-Regular;
  font-weight: bold;
  text-align: center;
  color: #eef8ff;
  line-height: 48px;
  border-bottom-color: #5176a0;
  :hover {
  }
}
.module_table .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
  background: #07376a;
}
.module_table .el-table--border {
  border: 1px solid #00fbff;
}
.module_table .el-table::before {
  height: 0;
}
.module_table .el-table thead {
  color: #fff;
}
.module_table .el-table__body tr.current-row > td {
  background: #07376a;
}
.module_table .el-pagination {
  text-align: right;
  margin-top: 25px;
  .btn-prev,
  .el-pager li,
  .btn-next {
    color: #b9bed6;
    background: rgba(239, 241, 244, 0.2);
  }
  .el-pager li.active {
    background: #2f98fa;
  }
  .el-pager li {
    color: #b9bed6;
    background: rgba(239, 241, 244, 0.2);
  }
  .el-pagination__sizes .el-input .el-input__inner {
    color: #b9bed6;
    background: rgba(239, 241, 244, 0.2);
    border: none;
  }
  .el-input--medium .el-input__inner {
    height: 26px;
    line-height: 26px;
    color: #b9bed6;
    background: rgba(239, 241, 244, 0.2);
  }
  .el-pagination__jump {
    font-size: 16px;
    font-family: Microsoft YaHei, Microsoft YaHei-Regular;
    font-weight: 400;
    text-align: left;
    color: #b9bed6;
  }
}
</style>
  